<template>
	<div id="app">
		<router-view v-if="isRouterAlive" />
	</div>
</template>
<script lang="ts">
import { nextTick, ref, provide } from 'vue';
export default {
	name: 'App',

	setup() {
		const isRouterAlive = ref(<boolean>true);
		const reload = () => {
			isRouterAlive.value = false;
			nextTick(() => {
				isRouterAlive.value = true;
			});
		};
		provide('reload', reload);
		return { reload, isRouterAlive };
	},
};
</script>
<style lang="scss">
#app {
	font-family: 'Microsoft YaHei', 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
		'微软雅黑', Avenir, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	min-width: 800px;
	height: 100vh;
	margin: 0;
	padding: 0;
	list-style: none;
}
</style>
